package com.ziyun.erp.modules.production.dao;

import com.ziyun.erp.modules.production.entity.ErpOrderItemEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ziyun.erp.modules.production.entity.vo.ErpOrderItemAllotVo;
import com.ziyun.erp.modules.production.vo.ErpOrderItemListVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * erp订单商品表
 * 
 * @author guizhao
 * @date 2018-08-22 14:44:58
 */
public interface ErpOrderItemDao extends BaseMapper<ErpOrderItemEntity> {

    List<ErpOrderItemAllotVo> selectErpOrderItemAllotVosByNo(String orderNo);

    int updateByMap(@Param("map") Map<String, Object> map, @Param("eoItemId") Integer eoItemId);

    int updateBatchByMap(@Param("map") Map<String, Object> updateMap, @Param("eoItemIds") List<Integer> eoItemIds);

    ErpOrderItemEntity selectByItemId(Integer itemId);

    BigDecimal selectItemTotalMoney(String orderNo);

    int updateBatchByOrderItemId(@Param("map") Map<String, Object> updateMap, @Param("itemIds") List<Integer> itemIds);

    int updateByMapOrderId(@Param("map") Map<String, Object> map, @Param("orderId") String orderId);

    List<ErpOrderItemListVo> selectListByOrderId(@Param("orderId") String orderId);
}
